<?php
class AdminMain extends Controller {
	function __construct() {
		parent::__construct();
		Auth::handleLogin();
		$this -> view -> js = array('adminmain/js/default.js');
	}

	function index() {
		$this -> view -> render("adminmain/index");
	}
	
	function removeUserCascade() {
		$this->model->removeUserCascade();
	}
	
	function restoreUser() {
		$this->model->restoreUser();
	}
	
	function removeUser() {
		$this->model->removeUser();
	}

	function logout() {
		Session::destroy();
		header('location: ' . URL . 'login');
		exit ;
	}
	
	function removeSocialhealth() {
		$this->model->removeSocialhealth();
	}
	
	function removeSpeciality() {
		$this->model->removeSpeciality();
	}
	
	function removeBoss() {
		$this->model->removeBoss();
	}
	
	function removeSecretary() {
		$this->model->removeSecretary();
	}
	
	function removeDoctor() {
		$this->model->removeDoctor();
	}
	
	function isDoctorErasable() {
		$this->model->isDoctorErasable();
	}
	
	function isSocialhealthErasable() {
		$this->model->isSocialhealthErasable();
	}
	
	function isSpecialityErasable() {
		$this->model->isSpecialityErasable();
	}
	
	function getAllDoctorsRaw() {
		$this->model->getAllDoctorsRaw();
	}
	
	function getAllSpecialitiesRaw() {
		$this->model->getAllSpecialitiesRaw();
	}
	
	function getAllSocialHealthRaw() {
		$this->model->getAllSocialHealthRaw();
	}
	
	function alreadyExistSocialHealth() {
		$this->model->alreadyExistSocialHealth();
	}
	
	function alreadyExistSpeciality() {
		$this->model->alreadyExistSpeciality();
	}
	
	function alreadyHaveLicense() {
		$this->model->alreadyHaveLicense();
	}
	
	function alreadyExistSecretary() {
		$this->model->alreadyExistSecretary();
	}
	
	function alreadyExistDoctor() {
		$this->model->alreadyExistDoctor();
	}
	
	function restoreBoss() {
		$this->model->restoreBoss();
	}
	
	function restoreSecretary() {
		$this->model->restoreSecretary();
	}
	
	function restoreDoctor() {
		$this->model->restoreDoctor();
	}
	
	function eraseUser() {
		$this->model->eraseUser();
	}
	
	function restoreSocialhealth() {
		$this->model->restoreSocialhealth();
	}
	
	function getAllErasedSocialHealthDt() {
		$this->model->getAllErasedSocialHealthDt();
	}
	
	function restoreSpeciality() {
		$this->model->restoreSpeciality();
	}
	
	function getAllErasedSpecialitiesDt() {
		$this->model->getAllErasedSpecialitiesDt();
	}
	
	function getAllErasedBossDt() {
		$this->model->getAllErasedBossDt();
	}
	
	function getAllErasedSecretaryDt() {
		$this->model->getAllErasedSecretaryDt();
	}
	
	function getAllErasedDoctorsDt() {
		$this->model->getAllErasedDoctorsDt();
	}
	
	function eraseSchedule() {
		$this->model->eraseSchedule();
	}
	
	function updateSchedule() {
		$this->model->updateSchedule();
	}
	
	function removeSchedule() {
		$this->model->removeSchedule();
	}
	
	function insertSchedule() {
		$this->model->insertSchedule();
	}
	
	function isDoctorInLicense() {
		$this->model->isDoctorInLicense();
	}
	
	function getDoctorSchedules() {
		$this->model->getDoctorSchedules();
	}
	
	function eraseSocialhealth() {
		$this->model->eraseSocialhealth();
	}
	
	function eraseSpeciality() {
		$this->model->eraseSpeciality();
	}
	
	function inserSocialhealth() {
		$this->model->inserSocialhealth();
	}
	
	function inserSpeciality() {
		$this->model->inserSpeciality();
	}
	
	function modifySecretary() {
		$this->model->modifySecretary();
	}
	
	function modifyBoss() {
		$this->model->modifyBoss();
	}
	
	function getSecretaryById() {
		$this->model->getSecretaryById();
	}
	
	function getBossById() {
		$this->model->getBossById();
	}
	
	function eraseLicense() {
		$this->model->eraseLicense();
	}
	
	function inserLicense() {
		$this->model->inserLicense();
		header('Location: http://localhost/clinica/adminmain#tab1');
	}
	
	function getLicenseForDoctorDt() {
		$this->model->getLicenseForDoctorDt();
	}
	
	function modifyDoctor() {
		$this->model->modifyDoctor();
		header('Location: http://localhost/clinica/adminmain#tab1');
	}

	function getDoctorById() {
		$this->model->getDoctorById();
	}

	function getAllDoctorsDt() {
		$this -> model -> getAllDoctorsDt();
	}

	function eraseDoctor() {
		$this -> model -> eraseDoctor();
	}

	function eraseSecretary() {
		$this -> model -> eraseSecretary();
	}
	
	function eraseBoss() {
		$this -> model -> eraseBoss();
	}

	function getAllDoctors() {
		$this -> model -> getAllDoctors();
	}

	function getAllBossDt() {
		$this -> model -> getAllBossDt();
	}

	function getAllSecretarysDt() {
		$this -> model -> getAllSecretarysDt();
	}

	function getAllBoss() {
		$this -> model -> getAllBoss();
	}

	function getAllSecretarys() {
		$this -> model -> getAllSecretarys();
	}

	function getAllSocialHealth() {
		$this -> model -> getAllSocialHealth();
	}

	function getAllSocialHealthDt() {
		$this -> model -> getAllSocialHealthDt();
	}

	function getAllSpecialitiesDt() {
		$this -> model -> getAllSpecialitiesDt();
	}

	function getAllSpecialities() {
		$this -> model -> getAllSpecialities();
	}

	function getAllSpecialitiesById() {
		$this -> model -> getAllSpecialitiesById();
	}

	function getAllSocialHealthById() {
		$this -> model -> getAllSocialHealthById();
	}

	function insertDoctor() {
		$this -> model -> insertDoctor();
		header('Location: http://localhost/clinica/adminmain#tab1');
	}

	function insertBoss() {
		$this -> model -> insertBoss();
		header('Location: http://localhost/clinica/adminmain#tab2');
	}

	function insertSecretary() {
		$this -> model -> insertSecretary();
		header('Location: http://localhost/clinica/adminmain#tab2');
	}

}
